package com.hube.platform.tenant.helper;

import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.converter.ConverterFactory;
import ma.glasnost.orika.impl.DefaultMapperFactory;

/**
 * @author : Aaron
 * @date : 2022/6/8
 */
public class FacadeBuilder {

    public static MapperFactory mapperFactory = new DefaultMapperFactory.Builder().useAutoMapping(true).mapNulls(true).build();

    static {
        ConverterFactory converterFactory = mapperFactory.getConverterFactory();
        //converterFactory.registerConverter(); 可以做一些类型转换器配置
        //mapA2B(); 自定义字段转换
    }

    /*private static void mapA2B() {
        mapperFactory
                .classMap(A.class, B.class)
                .field("aName", "bName")
                .field("a.age", "bAge")
                .byDefault()
                .register();
    }*/

}
